﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class SiteSearchInfo
    {
        public ModelEnum Model { get; set; }

        public String Title { get; set; }

        public String ID { get; set; }


        public string ModelString
        {

            get
            {
                switch (Model)
                {
                    case ModelEnum.News:
                        return "新闻";
                    case ModelEnum.Artist:
                        return "艺术家";
                    case ModelEnum.Adviser:
                        return "顾问";
                    case ModelEnum.ArtWork:
                        return "艺术品";
                    case ModelEnum.ArtWorkReview:
                        return "艺术评论";
                    default:
                        return "";
                }
            }
        }


        public String LinkURL
        {
            get
            {
                switch (Model)
                {
                    case ModelEnum.News:
                        return "/News/ViewNews?id=" + ID;
                    case ModelEnum.Artist:
                        return "/Artist/ViewArtist?id=" + ID;
                    case ModelEnum.Adviser:
                        return "/Adviser/ViewAdviser?id=" + ID;
                    case ModelEnum.ArtWork:
                        return "/ArtWork/ViewArtWork?id=" + ID;
                    case ModelEnum.ArtWorkReview:
                        return "/ArtWorkReview/ViewArtWorkReview?id=" + ID;
                    default:
                        return "#";
                }
            }
        }

    }



    public enum ModelEnum
    {
        News,

        Artist,

        Adviser,

        ArtWork,

        ArtWorkReview
    }
}
